﻿CREATE FUNCTION [audit].[GetTraceEventNo]
(@EventName VARCHAR (255))
RETURNS INT
AS
BEGIN
	DECLARE @ReturnValue int

	SELECT @ReturnValue = [Number]
	FROM [config].[TraceEvents]
	WHERE([Name] = @EventName)

	RETURN(@ReturnValue)
END